package com.yhn.init.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import com.yhn.init.common.BaseResponse;
import com.yhn.init.common.ResultUtils;
import com.yhn.init.service.AttendanceService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * 签到记录
 *
 * @author yhnyhn123
 * @email 2236751002@qq.com
 * @date 2024-03-08 20:36:42
 */
@RestController
@RequestMapping("/attendance")
public class AttendanceController {

    @Resource
    private AttendanceService attendanceService;

    @PostMapping
    @SaCheckLogin
    public BaseResponse<Integer> attendance() {
        Integer signDays = attendanceService.sign();
        return ResultUtils.success(signDays);
    }


}
